package com.googlecode.FWT.controller
{
	import com.googlecode.FWT.model.ProjectDataProxy;
	
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;

	/**
	 * Responds to the user selecting the next page in sequence. 
	 * @author ~martin
	 * 
	 */
	public class GoForwardCommand extends SimpleCommand
	{
		override public function execute(notification:INotification):void
		{
			// get a reference to the ProjectDataProxy
			var proxy:ProjectDataProxy = facade.retrieveProxy(ProjectDataProxy.NAME) as ProjectDataProxy;
			
			// get loaded page index
			var index:int = proxy.loadedPageIndex;
			
			// set loadedPageIndex
			proxy.loadedPageIndex = index + 1;	
		}
		
	}
}